package com.lwk.springboot.web;

import com.lwk.springboot.domain.MyException;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: leiwenkang02@meituan.com
 * @date: 2018/4/12
 * @time: 17:51
 */
@RestController
public class HelloController {
    @RequestMapping("/hello")
    public String hello() throws Exception{
        throw new Exception("发生错误");
    }

    @RequestMapping("/json")
    public String json() throws Exception{
        throw new MyException("发生错误2");
    }
}
